Skip to content

[TypeScript] Export ValidationMessageFuncParams and ValidationMessageFunc types#10867

Merged
fzaninotto merged 2 commits intonextfrom
export-validation-message-types
Jul 30, 2025
Merged

[TypeScript] Export ValidationMessageFuncParams and ValidationMessageFunc types#10867
fzaninotto merged 2 commits intonextfrom
export-validation-message-types

Conversation

@djhi
Copy link
Copy Markdown
Contributor

@djhi djhi commented Jul 29, 2025

Problem

Some users need those types but they are not exported so they had to duplicate them in their code.

Solution

Export them with better names.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature

}

type MessageFunc = (params: MessageFuncParams) => ValidationErrorMessage;
export type ValidationMessageFunc = (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No a big fan of this name. I suggest ValidationMessageFactory, GetValidationMessage, or GenerateValidationMessage. Append Params for the second type.

@fzaninotto fzaninotto merged commit 8b43a9a into next Jul 30, 2025
15 checks passed
@fzaninotto fzaninotto deleted the export-validation-message-types branch July 30, 2025 16:01
@fzaninotto fzaninotto added this to the 5.11.0 milestone Jul 30, 2025
@fzaninotto fzaninotto changed the title Export ValidationMessageFuncParams and ValidationMessageFunc types [typeScript] Export ValidationMessageFuncParams and ValidationMessageFunc types Jul 31, 2025
@fzaninotto fzaninotto changed the title [typeScript] Export ValidationMessageFuncParams and ValidationMessageFunc types [TypeScript] Export ValidationMessageFuncParams and ValidationMessageFunc types Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants